// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';

import QModelViewer from '@/views/QModelViewer';
import Demo1 from '@/views/demo/demo1';
import Demo3 from '@/views/demo/demo3';
import Demo4 from '@/views/demo/demo4';
import Demo5 from '@/views/demo/demo5';
import Demo6 from '@/views/demo/demo6';
import DemoCesium from '@/views/demo/DemoCesium';
// import DemoGltf from '@/views/demo/DemoGltf';
// import Demo2D_3D from '@/views/demo/Demo2D_3D';
import DemoCompare from '@/views/demo/DemoCompare';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
import ModelMgr from '@/views/goods/ModelMgr';
import Demo2D from '@/views/demo/Demo2D';
import DwgMgr from '@/views/goods/DwgMgr';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';

/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';


// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
                path: '/goods/ModelMgr',
                name: '模型列表',
                component: ModelMgr,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/goods/DwgMgr',
                name: '图纸列表',
                component: DwgMgr,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/qmodel',
                name: '模型管理',
                component: QModelViewer,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/dwg',
                name: '图纸浏览',
                component: Demo2D,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/Demo1',
                name: '示例1-标签应用',
                component: Demo1,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/DemoCesium',
                name: '示例2-Cesium',
                component: DemoCesium,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/Demo3',
                name: '示例3-本地模型',
                component: Demo3,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/Demo4',
                name: '示例4-合并模型',
                component: Demo4,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/Demo5',
                name: '示例5-特殊效果',
                component: Demo5,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/demo/Demo6',
                name: '示例6-施工常用',
                component: Demo6,
                meta: {
                    requireAuth: true
                }
            },
            // {
            //     path: '/demo/DemoGltf',
            //     name: '示例7-加载GLTF',
            //     component: DemoGltf,
            //     meta: {
            //         requireAuth: true
            //     }
            // },
            // {
            //     path: '/demo/Demo2D_3D',
            //     name: '示例8-二三维联动',
            //     component: Demo2D_3D,
            //     meta: {
            //         requireAuth: true
            //     }
            // },
            // {
            //     path: '/demo/DemoCompare',
            //     name: '示例9-模型对比',
            //     component: DemoCompare,
            //     meta: {
            //         requireAuth: true
            //     }
            // },
            {
                path: '/goods/Goods',
                name: '更新说明',
                component: Goods,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/user',
                name: '用户管理',
                component: user,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Module',
                name: '菜单管理',
                component: Module,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Role',
                name: '角色管理',
                component: Role,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Dept',
                name: '公司管理',
                component: Dept,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Variable',
                name: '系统环境变量',
                component: Variable,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Permission',
                name: '权限管理',
                component: Permission,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/charts/statistics',
                name: '数据可视化',
                component: statistics,
                meta: {
                    requireAuth: true
                }
            }
        ]
    }]
})